﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Delegates
{
    class Program
    {
        public delegate void Del(string message);

        public static DelegateCollection delegateCollection = new DelegateCollection();

        static void Main(string[] args)
        {
            Del handler = DelegateMethod;
            handler("Hello World");

            delegateCollection.MethodWithCallback(5, 10, handler);
        }

        public static void DelegateMethod(string message)
        {
            Console.WriteLine(message);
        }
    }
}
